<!--2017-8-1-->
<style>
	#article-app{width:100%;}
	/*#mall-menu-info{min-width: 1280px}*/
	@media (max-width:1000px) {
		#article-app div article p img{width:100%;}
	}
	@media (min-width: 1000px) {
		.menu-info-img {min-height: 450px; width: 100%  }
	}
	/*.menu-info-img { height: 450px;  }*/
	.collect{display: block;margin: 15px 5px;background: green;color: white;cursor: pointer;height: 65px;text-align: -webkit-center; text-align: center;line-height: 65px;  }
	.menu-info-selected{background: none!important;}
	.detail_code::before{content: "型号";font-size: 14px;}
	@media (max-width: 1000px){
		.menu-info-img {
			min-height: 310.5px;
		}
	}
</style>
<div class='menu-container'>
	{include file='home:mall-header' /}
	<div style="height: 50px;" class='hidden-xs'></div>
	<div id='mall-menu-info' class='container bc-info no-init' data-port='http://api.hongyanche.com/mall/product_info'>
		<div class='weui-flex'>
			<div class='weui-flex__item'>
				<imgurl info=i><img class='menu-info-img bc-scroll-move' style="" /></imgurl>
			</div>
			&nbsp;&nbsp;
			<div class='weui-flex__item'>
				<div class='menu-info-heading'>
					<h1><name info=1></name> <small mute><labels_name info=1></labels_name></small></h1>
					<p mute><description info=1></description></p>
					<spare_parts_code info="d"><span>图文号：</span><spare_parts_code info=1></spare_parts_code></spare_parts_code>
					<h2><div class='menu-info-price'>
						<pei info="d">建议零售价：</pei>
						¥ <price_min detail=f>min</price_min><price_max_container> ~ <price_max detail=f>max</price_max></price_max_container>
						<detail_code></detail_code>
						<!-- <small><di!-- <small>il=d><small mute>(<discount detail=1></discount>%)</small></discount></small> -->
					</div></h2>
				</div>
				<div id='cashier-menu-detail' class='bc-detail'>
					<div>
						<div id='cashier-menu-detail-option-rank' class='bc-rank no-init'>
							<div class='cashier-menu-config bc-rank-template'>
								<div class='cashier-menu-detail-config'>
									<config_name_cn rank=1 class="js-hover"></config_name_cn><config_descripton rank=1 class="hidden">
								</config_descripton> <small class='hidden' mute>#<config_id rank=1></config_id></small><br/>
								</div>
								<config_options rank=r class='bc-float cashier-menu-detail-option'>
								<div><option_name_cn range=1></option_name_cn><config_descripton range=1></config_descripton><br/>
								</div>
								</config_options>
							</div>
						</div>
						<div style="clear: both"></div>
					</div>
				</div>
				<div class='menu-info-selected'>
					<p>
						<detail_code></detail_code>

						<options mall=r style="display: flex; flex-wrap: wrap;"><span style="display: inline-block; width: 50%; border-bottom: 1px solid #ddd;"><config_name_cn range=d><small mute><config_name_cn range=1></config_name_cn></small>:</config_name_cn><option_name_cn range=1></option_name_cn>&nbsp;</span></options>
					</p>
					<h2>价格: ¥ <price style='color:maroon' mall=f>0.00</price> <discount mall=d><small mute>(限时折扣 <discount mall=1></discount>%)</small></discount> <small class='hidden' mute>#<detail_id id='mall-menu-detail-id'></detail_id></small></h2>
					<deposit style='color:maroon' mall=d><h2>定金: ¥ <deposit style='color:maroon' mall=f>0.00</deposit></h2></deposit>
				</div>
				<div class='weui-flex weui-flex-xs'>
					<div class="weui-flex__item" style="flex: 0.2">
						<a class="collect" href="javascript:void (0)">收藏</a>
						<mall_id info=1 class="hidden"></mall_id>
					</div>
					<two info="d" class="weui-flex__item">
						<a id='' class='menu-info-add-to-cart'><span>联系方式: <car_owner info="1"></car_owner></span><tel info="1"></tel></a>
					</two>
					<pei info="none" class='weui-flex__item' style="display: flex;">
						<pei info="none" style="display: flex; width:100%;">
							<two info="none" style="display: block; flex: .8">
								<a id='mall-menu-info-add-to-cart' class='menu-info-add-to-cart'>加入购物车</a>
							</two>
							<two info="none" style="display: block; ">
								<a href='#mall_cart' style='background:#ef5549' class='menu-info-add-to-cart mall-cart-amount'><small class='hidden-xs'>购物车</small><i class='i i-cart_fill_light'></i>&nbsp;<span id="mall-info-cart">0</span></a>
							</two>
						</pei>
					</pei>
				</div>

				<detail class='hidden' info=1></detail>
			</div>
		</div>
		<div id="article-app">
			<div  style="border:3px solid #eee;padding:10px 0px 10px 20px;">
				<label style="font-size: 18px;">
					商品详情
				</label>
			</div>
			<div style="margin-top:50px;" >
				<article info=1></article>
			</div>
		</div>
	</div>
	<div style="height: 50px;" class='hidden-xs'></div>
</div>
<script type="text/javascript">
	var mall_id = PAGE.getId();
	mall_id = mall_id[0];
	INFO.reload('#mall-menu-info',{mall_id:mall_id});
	((function (w, u) {
		$('#cashier-menu-detail-option-rank').on('mouseover', '.js-hover', function () {
			$(this).next().removeClass('hidden').css({
				border: '1px solid #eee',
				fontSize: '14px',
				color: '#999',
				padding: '5px',
                marginLeft: '10px',
                backgroundColor: 'azure'
			})
        });

        $('#cashier-menu-detail-option-rank').on('mouseout', '.js-hover', function () {
            $(this).next().addClass('hidden')
        });
		$('.collect').on('click', function () {
			var mallID = $(this).next().text();
            var url = window.location.href;
            $.ajax({
                url: '/collect/add',
                type: 'POST',
                data: {
                    mall_id: mallID,
                    'class': 1,
                    url: url
                },
                success: function (data) {
                    if(data.state){
                        
					}else{
                        alert(data.errormsg)
					}
                }
            })
        })
    })(window, undefined));

    $.ajax({
        url:'/cart/amount',
        success:function (e) {
            if(e.data.amount==0){
                $('#cartamount').html(e.data.amount)
                $('#cartamount').css('color','white')
                $('#mall-info-cart').css('color','white')
            }else {
                $('#cartamount').html(e.data.amount)
                $('#mall-info-cart').html(e.data.amount)
                $('#cartamount').css('color', '#FFA500')
                $('#mall-info-cart').css('color', 'white')
            }
        }
    })
</script>